﻿using System.Collections.Generic;

namespace DataVirtualization
{
	/// <summary>
	/// Represents a provider of collection details.
	/// </summary>
	/// <typeparam name="T">The type of items in the collection.</typeparam>
	public interface IItemsProvider<T>
	{
		/// <summary>
		/// Fetches a range of items.
		/// </summary>
		/// <param name="startIndex">The start index.</param>
		/// <param name="count">The number of items to fetch.</param>
		/// <returns></returns>
		IList<T> FetchRange(int startIndex, int count);

		/// <summary>
		/// Indicates provider update status
		/// </summary>
		bool IsUpdated { get; set; }

		/// <summary>
		/// Fetches the total number of items available.
		/// </summary>
		int Count { get; }
	}
}
